<style>
  .code-repl-input-box {
    border: 1px solid #ccc;
  }
</style>

<script type="text/ng-template" id="interactiveWidget/CodeRepl">
  <div>
    <div>
      <em>Language: <[language]></em>
    </div>
    <br>
    <form ng-submit="runCode(code)">
      <div class="code-repl-input-box">
        <div ui-codemirror="{onLoad: initCodeEditor}">
        </div>
      </div>
      <button type="submit" class="btn btn-default" ng-disabled="!hasLoaded">Run</button>
    </form>
  </div>
</script>

<script type="text/ng-template" id="response/CodeRepl">
  <div>
    <h5>Code</h5>
    <pre><[answer.code]></pre>

    <span ng-if="answer.output">
      <h5>Output</h5>
      <pre><[answer.output]></pre>
    </span>

    <span ng-if="answer.error">
      <font color=red>Error: <[answer.error]></font><br>
    </span>

    <span ng-if="answer.evaluation">
      &gt;&gt; <[answer.evaluation]>
    </span>
  </div>
</script>
